#ifndef BYTESET_H
#define BYTESET_H

#include <QByteArray>
#include <QString>
#include <QFile>
#include <QObject>
#include <QtDebug>
class ByteSet : public QObject
{
    Q_OBJECT
public:
    ByteSet();
    ~ByteSet();
    QByteArray makeByte(QByteArray);
    QByteArray initEngine2ComByte();  //初始化机器Byte拼接
    QByteArray sampleInfoSend2Com();    //样品参数下发
    QByteArray systemInfoSend2Com();    //系统参数下发
    QByteArray startTest2ComByte();     //开始测量Byte拼接
    QByteArray stopTest2ComByte();      //停止测量
    QByteArray calcuCheckBit(QString gongneng, int length, QList<int> dataList);
    QByteArray calCuCheckBitNew(QString gongneng, int length, QList<QString> dataList);
    QByteArray appendSample2Com();      //补充样品
    QByteArray cleanBox2Com();          //清理料斗

    //校准相关
    QByteArray caliZero2Com();
    QByteArray caliStandardValue2Com();//吸阻校准标准值
    QByteArray caliCancle2Com();
    QByteArray caliSuccess2Com();//校准完成指令
    QByteArray caliCheck2Com();//校准验证
    //单步调试相关
    QByteArray upTap();     //上管夹阀
    QByteArray downTap();
    QByteArray yansi();
    QByteArray lvzui();
    QByteArray dingzhen();
    QByteArray yansitongfeng();
    QByteArray lvzuitongfeng();
    QByteArray tongfengxuanze();
    QByteArray chouxi();

    QByteArray upTap0();     //上管夹阀
    QByteArray downTap0();
    QByteArray yansi0();
    QByteArray lvzui0();
    QByteArray dingzhen0();
    QByteArray yansitongfeng0();
    QByteArray lvzuitongfeng0();
    QByteArray tongfengxuanze0();
    QByteArray chouxi0();
private:
    QStringList suctionStrList;
    int holdTime=4000;
    void printByte(QByteArray);
    QString standardValue;
public slots:
    void setSuctionStrList(QStringList str){
        suctionStrList = str;
    };
    void setHoldTime(int tTime){
        holdTime = tTime;
    };
    void setStandardValue(QString str){
        standardValue = str;
    }
private:

signals:
    void sendByte(QByteArray);
};

#endif // BYTESET_H
